package com.lijie.bs_recruit.controller;


import com.github.pagehelper.PageInfo;
import com.lijie.bs_recruit.model.Hr;
import com.lijie.bs_recruit.service.HrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 李杰
 * @since 2021-03-15
 */
@RestController
@RequestMapping("/hr")
public class HrController {

    @Autowired
    HrService hrService;

    //查询所有hr列表
    @RequestMapping("/selHrList/{page}")
    public PageInfo<Hr> selHrList(@PathVariable Integer page, @RequestBody Hr hr){
        PageInfo<Hr> positions = hrService.selHrPage(page, hr);
        return positions;
    }
    //改变hr状态
    @RequestMapping("changeHrIsdeleted")
    public Boolean changeHrIsdeleted(@RequestBody Hr hr){
        Boolean res=false;
        if(hr.getHrId()!=null){
            res = hrService.changeHrIdeleted(hr);
        }
        return res;
    }


}

